import React from 'react';
import { Modal } from 'antd';

export default class FolderModal extends React.Component {
    state = {
        modal_visible: false
    };

    componentWillReceiveProps(nextProps) {
        this.setState({
            modal_visible: nextProps.modal_visible
        });
    }

    handleCancel = () => {
        this.setState({
            modal_visible: false
        });
    };

    handleOk = () => {
        this.setState({
            modal_visible: false
        });
    };

    render() {
        return (
            <Modal
                title="选择简报夹"
                visible={this.state.modal_visible}
                onOk={this.handleOk}
                onCancel={this.handleCancel}>
                <p>This is a modal.</p>
            </Modal>
        );
    }
}
